﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections;

namespace _012
{
    internal class Program
    {
        static void Main(string[] args)
        {
            Queue q = new Queue();

            q.Enqueue('A');
            q.Enqueue('B');
            q.Enqueue('C');
            q.Enqueue('D');

            Console.WriteLine("当前队列：");
            foreach(char c in q)
            {
                Console.Write(c + " ");
            }
            Console.WriteLine("\r\n向队列中添加一些元素：\r\nE F");
            q.Enqueue('E');
            q.Enqueue('F');
            Console.WriteLine("当前队列：");
            foreach(char c in q)
            {
                Console.Write(c + " ");
            }
            Console.WriteLine();
            Console.WriteLine("删除一些值:");
            char ch = (char)q.Dequeue();
            Console.Write(ch + " ");
            ch = (char)q.Dequeue();
            Console.Write(ch + "\r\n");
            Console.WriteLine("当前队列:");
            foreach(char c in q)
            {
                Console.Write(c + " ");
            }
            Console.ReadKey();
        }
    }
}
